As cloud computing technologies develop, a big data era requiring massive data processing has come. In order to meet parallelization and diversification trends of applications and an urgent desire of corresponding industries for reducing energy consumption, a heterogeneous system becomes a new research hotspot.
The heterogeneous system refers to a system obtained by interconnecting, in various manners, two systems including different processors. For example, one system includes an X86 processor, and the other system includes an ARM processor. Each system in the heterogeneous system not only includes a processor, but also includes a memory and a peripheral device that are independent from each other. Because the heterogeneous system has features of a high computing capability, a rich hardware resource, and close coupling, when the heterogeneous system is used to execute applications with different characteristics, a hardware advantage of the heterogeneous system can be brought into full play. Therefore, energy consumption of the heterogeneous system can be effectively reduced and a performance ratio can be improved. For example, there are two computing tasks, and the two computing tasks interact with each other relatively frequently, where one computing task is relatively complex (which needs to be run on an X86 processor), and the other computing task is relatively simple (which may be run on an X86 processor or on an ARM processor). If there is no heterogeneous system, two X86 processors are required to complete the two computing tasks. If there is a heterogeneous system, the heterogeneous system with X86+ARM processors may be used to complete the two computing tasks, where the complex computing task is run on the X86 processor, and the simple task is run on the ARM processor. Power consumption of the ARM processor is much lower than that of the X86 processor, and therefore, using the heterogeneous system reduces the energy consumption of the heterogeneous system effectively and improves the performance ratio.
As PCI Express technologies develop continuously, people begin to use a non-transparent bridge (NTB) in a PCIe-switch to interconnect two systems in a heterogeneous system. In a process of implementing the present disclosure, the inventor finds that: in the prior art, only memory sharing in a heterogeneous system can be implemented, where the so-called “memory sharing” refers to that two systems in the heterogeneous system not only can access a memory of a local system, but also can access a memory of a peer system. However, currently, sharing peripheral device cannot be implemented in the heterogeneous system in the prior art, in other words, the two systems in the heterogeneous system can access only a peripheral device of the local system, but cannot access a peripheral device of the peer system.